import Vue from 'vue';
import App from './App.vue';
import VueRouter from 'vue-router';
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';

// 导入视图组件
import homePage from './views/homePage.vue';
import equipTypePage from './views/equipTypePage.vue';
import equipPage from './views/equipPage.vue';
import classPage from './views/classPage.vue';
import equipBasicPage from './views/equipBasicPage.vue';
Vue.config.productionTip = false;
Vue.use(VueRouter);
Vue.use(ElementUI);

// 添加一个简单的根组件，用于处理未匹配的路由
const EmptyView = {
  template: '<div>404 - Page not found</div>'
};

const router = new VueRouter({
  routes: [
    { path: '/home', component: homePage },
    { path: '/type', component: equipTypePage },
    { path: '/equip', component: equipPage },
	{ path: '/class', component: classPage },
	{ path: '/basic', component: equipBasicPage }
  ]
});

new Vue({
  render: h => h(App),
  router
}).$mount('#app');